package org.common.utils.geometry;

public class Rectangle 
{
	/**  左上角，右下角，两点行成一个矩形*/
	private Point leftTop ,rightBottom , heightPoint;

	public Rectangle(Point leftTop, Point rightBottom) {
		this.leftTop = leftTop;
		this.rightBottom = rightBottom;
	}
	
	public Rectangle(float x1 , float y1 , float x2 , float y2) {
		this.leftTop = new Point(x1 , y1);
		this.rightBottom = new Point(x2 , y2);
	}
	
	public Rectangle(Point leftTop, Point rightBottom, Point heightPoint) {
		this.leftTop = leftTop;
		this.rightBottom = rightBottom;
		this.heightPoint = heightPoint;
	}

	public Point getLeftTop() {
		return leftTop;
	}

	public Point getRightBottom() {
		return rightBottom;
	}

	public Point getHeightPoint() {
		return heightPoint;
	}
	
	@Override
	public String toString() 
	{
		return (int)this.leftTop.x + "x"+(int)this.leftTop.y;
	}
}
